package com.example.demo.service;


import com.example.demo.domain.Course;
import com.example.demo.repository.CourseRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 课程服务层，用于访问课程的数据业务逻辑
 */
@Service
public class CourseService {

    @Autowired
    private CourseRepository courseRepository;
    public List<Course> getAll(){ return courseRepository.findAll(); }
}
